diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 20:41:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 20:41:04 -0400 |
commit | 69f1d1a6acbaa7d83ef3f4ee26209c58cd000204 (patch) | |
tree | 12be981f8a123b8361edd64b84fd72f339a9655d /arch/arm/mach-mmp | |
parent | 2d86a3f04e345b03d5e429bfe14985ce26bff4dc (diff) | |
parent | 1e09939bad24df95ddeeeca4fbec64fa94b66def (diff) |
Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (128 commits)
ARM: S5P64X0: External Interrupt Support
ARM: EXYNOS4: Enable MFC on Samsung NURI
ARM: EXYNOS4: Enable MFC on universal_c210
ARM: S5PV210: Enable MFC on Goni
ARM: S5P: Add support for MFC device
ARM: EXYNOS4: Add support FIMD on SMDKC210
ARM: EXYNOS4: Add platform device and helper functions for FIMD
ARM: EXYNOS4: Add resource definition for FIMD
ARM: EXYNOS4: Change devname for FIMD clkdev
ARM: SAMSUNG: Add IRQ_I2S0 definition
ARM: SAMSUNG: Add platform device for idma
ARM: EXYNOS4: Add more registers to be saved and restored for PM
ARM: EXYNOS4: Add more register addresses of CMU
ARM: EXYNOS4: Add platform device for dwmci driver
ARM: EXYNOS4: configure rtc-s3c on NURI
ARM: EXYNOS4: configure MAX8903 secondary charger on NURI
ARM: EXYNOS4: configure ADC on NURI
ARM: EXYNOS4: configure MAX17042 fuel gauge on NURI
ARM: EXYNOS4: configure regulators and PMIC(MAX8997) on NURI
ARM: EXYNOS4: Increase NR_IRQS for devices with more IRQs
...
Fix up tons of silly conflicts:
- arch/arm/mach-davinci/include/mach/psc.h
- arch/arm/mach-exynos4/Kconfig
- arch/arm/mach-exynos4/mach-smdkc210.c
- arch/arm/mach-exynos4/pm.c
- arch/arm/mach-imx/mm-imx1.c
- arch/arm/mach-imx/mm-imx21.c
- arch/arm/mach-imx/mm-imx25.c
- arch/arm/mach-imx/mm-imx27.c
- arch/arm/mach-imx/mm-imx31.c
- arch/arm/mach-imx/mm-imx35.c
- arch/arm/mach-mx5/mm.c
- arch/arm/mach-s5pv210/mach-goni.c
- arch/arm/mm/Kconfig
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/clock.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-mmp/clock.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/gplugd.c | 189 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/mfp-gplugd.h | 52 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/mfp-pxa168.h | 19 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/pxa168.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/regs-apmu.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/pxa168.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-mmp/ttc_dkb.c | 31 |
11 files changed, 329 insertions, 1 deletions
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index 67793a690272..56ef5f6c8116 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 | ||
80 | config 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 | |||
80 | endmenu | 87 | endmenu |
81 | 88 | ||
82 | config CPU_PXA168 | 89 | config CPU_PXA168 |
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile index 5c68382141af..b0ac942327aa 100644 --- a/arch/arm/mach-mmp/Makefile +++ b/arch/arm/mach-mmp/Makefile | |||
@@ -19,3 +19,4 @@ obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o | |||
19 | obj-$(CONFIG_MACH_FLINT) += flint.o | 19 | obj-$(CONFIG_MACH_FLINT) += flint.o |
20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o | 20 | obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o |
21 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o | 21 | obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o |
22 | obj-$(CONFIG_MACH_SHEEVAD) += gplugd.o | ||
diff --git a/arch/arm/mach-mmp/clock.c b/arch/arm/mach-mmp/clock.c index 886e05648f08..7c6f95f29142 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 | } |
90 | EXPORT_SYMBOL(clk_get_rate); | 90 | EXPORT_SYMBOL(clk_get_rate); |
91 | |||
92 | int 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 | } | ||
105 | EXPORT_SYMBOL(clk_set_rate); | ||
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h index 9b027d7491f5..3143e994e672 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 | ||
17 | struct clk { | 18 | struct clk { |
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c new file mode 100644 index 000000000000..c070c24255f4 --- /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 | |||
23 | static 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 | |||
121 | static 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 */ | ||
129 | static 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 | |||
142 | struct 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 | |||
149 | static 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 | |||
169 | static 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 | |||
183 | MACHINE_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, | ||
189 | MACHINE_END | ||
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 000000000000..b8cf38d85600 --- /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 713be155a44d..8c782328b21c 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 a52b3d2f325c..7f005843a707 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 | ||
18 | extern struct pxa_device_desc pxa168_device_uart1; | 19 | extern struct pxa_device_desc pxa168_device_uart1; |
19 | extern struct pxa_device_desc pxa168_device_uart2; | 20 | extern struct pxa_device_desc pxa168_device_uart2; |
21 | extern struct pxa_device_desc pxa168_device_uart3; | ||
20 | extern struct pxa_device_desc pxa168_device_twsi0; | 22 | extern struct pxa_device_desc pxa168_device_twsi0; |
21 | extern struct pxa_device_desc pxa168_device_twsi1; | 23 | extern struct pxa_device_desc pxa168_device_twsi1; |
22 | extern struct pxa_device_desc pxa168_device_pwm1; | 24 | extern struct pxa_device_desc pxa168_device_pwm1; |
@@ -31,6 +33,7 @@ extern struct pxa_device_desc pxa168_device_ssp5; | |||
31 | extern struct pxa_device_desc pxa168_device_nand; | 33 | extern struct pxa_device_desc pxa168_device_nand; |
32 | extern struct pxa_device_desc pxa168_device_fb; | 34 | extern struct pxa_device_desc pxa168_device_fb; |
33 | extern struct pxa_device_desc pxa168_device_keypad; | 35 | extern struct pxa_device_desc pxa168_device_keypad; |
36 | extern struct pxa_device_desc pxa168_device_eth; | ||
34 | 37 | ||
35 | static inline int pxa168_add_uart(int id) | 38 | static 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 | ||
124 | static 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 f7011ef70bf5..8447ac63e28f 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 ab9f999106c7..0156f535dae7 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 */ |
67 | static APBC_CLK(uart1, PXA168_UART1, 1, 14745600); | 67 | static APBC_CLK(uart1, PXA168_UART1, 1, 14745600); |
68 | static APBC_CLK(uart2, PXA168_UART2, 1, 14745600); | 68 | static APBC_CLK(uart2, PXA168_UART2, 1, 14745600); |
69 | static APBC_CLK(uart3, PXA168_UART3, 1, 14745600); | ||
69 | static APBC_CLK(twsi0, PXA168_TWSI0, 1, 33000000); | 70 | static APBC_CLK(twsi0, PXA168_TWSI0, 1, 33000000); |
70 | static APBC_CLK(twsi1, PXA168_TWSI1, 1, 33000000); | 71 | static APBC_CLK(twsi1, PXA168_TWSI1, 1, 33000000); |
71 | static APBC_CLK(pwm1, PXA168_PWM1, 1, 13000000); | 72 | static APBC_CLK(pwm1, PXA168_PWM1, 1, 13000000); |
@@ -81,11 +82,13 @@ static APBC_CLK(keypad, PXA168_KPC, 0, 32000); | |||
81 | 82 | ||
82 | static APMU_CLK(nand, NAND, 0x19b, 156000000); | 83 | static APMU_CLK(nand, NAND, 0x19b, 156000000); |
83 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); | 84 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); |
85 | static APMU_CLK(eth, ETH, 0x09, 0); | ||
84 | 86 | ||
85 | /* device and clock bindings */ | 87 | /* device and clock bindings */ |
86 | static struct clk_lookup pxa168_clkregs[] = { | 88 | static 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 | ||
105 | static int __init pxa168_init(void) | 109 | static int __init pxa168_init(void) |
@@ -149,6 +153,7 @@ void pxa168_clear_keypad_wakeup(void) | |||
149 | /* on-chip devices */ | 153 | /* on-chip devices */ |
150 | PXA168_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4017000, 0x30, 21, 22); | 154 | PXA168_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4017000, 0x30, 21, 22); |
151 | PXA168_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4018000, 0x30, 23, 24); | 155 | PXA168_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4018000, 0x30, 23, 24); |
156 | PXA168_DEVICE(uart3, "pxa2xx-uart", 2, UART3, 0xd4026000, 0x30, 23, 24); | ||
152 | PXA168_DEVICE(twsi0, "pxa2xx-i2c", 0, TWSI0, 0xd4011000, 0x28); | 157 | PXA168_DEVICE(twsi0, "pxa2xx-i2c", 0, TWSI0, 0xd4011000, 0x28); |
153 | PXA168_DEVICE(twsi1, "pxa2xx-i2c", 1, TWSI1, 0xd4025000, 0x28); | 158 | PXA168_DEVICE(twsi1, "pxa2xx-i2c", 1, TWSI1, 0xd4025000, 0x28); |
154 | PXA168_DEVICE(pwm1, "pxa168-pwm", 0, NONE, 0xd401a000, 0x10); | 159 | PXA168_DEVICE(pwm1, "pxa168-pwm", 0, NONE, 0xd401a000, 0x10); |
@@ -163,3 +168,4 @@ PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59); | |||
163 | PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61); | 168 | PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61); |
164 | PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); | 169 | PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); |
165 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); | 170 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); |
171 | PXA168_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 e411039ea59e..6bd37a27e5fc 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 | ||
30 | static unsigned long ttc_dkb_pin_config[] __initdata = { | 42 | static 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 | ||
128 | static struct pca953x_platform_data max7312_data[] = { | ||
129 | { | ||
130 | .gpio_base = TTCDKB_GPIO_EXT0(0), | ||
131 | .irq_base = IRQ_BOARD_START, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | static 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 | |||
116 | static void __init ttc_dkb_init(void) | 144 | static 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 | ||