diff options
-rw-r--r-- | arch/arm/mach-davinci/Kconfig | 21 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-da830-evm.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-davinci/da830.c | 2 |
3 files changed, 65 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 40866c643f13..7b6dddf08e94 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig | |||
@@ -101,6 +101,27 @@ config MACH_DAVINCI_DA830_EVM | |||
101 | help | 101 | help |
102 | Say Y here to select the TI DA830/OMAP-L137 Evaluation Module. | 102 | Say Y here to select the TI DA830/OMAP-L137 Evaluation Module. |
103 | 103 | ||
104 | config DA830_UI | ||
105 | bool "DA830/OMAP-L137 UI (User Interface) board support" | ||
106 | depends on MACH_DAVINCI_DA830_EVM | ||
107 | help | ||
108 | Say Y here if you have the DA830/OMAP-L137 UI | ||
109 | (User Interface) board installed and you want to | ||
110 | enable the peripherals located on User Interface | ||
111 | board. | ||
112 | |||
113 | choice | ||
114 | prompt "Select DA830/OMAP-L137 UI board peripheral" | ||
115 | depends on DA830_UI | ||
116 | |||
117 | config DA830_UI_LCD | ||
118 | bool "LCD" | ||
119 | help | ||
120 | Say Y here to use the LCD as a framebuffer or simple character | ||
121 | display. | ||
122 | |||
123 | endchoice | ||
124 | |||
104 | config MACH_DAVINCI_DA850_EVM | 125 | config MACH_DAVINCI_DA850_EVM |
105 | bool "TI DA850/OMAP-L138 Reference Platform" | 126 | bool "TI DA850/OMAP-L138 Reference Platform" |
106 | default ARCH_DAVINCI_DA850 | 127 | default ARCH_DAVINCI_DA850 |
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index fe86afa7ea2e..fb941eb1f4da 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -13,7 +13,9 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/console.h> | 15 | #include <linux/console.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/i2c/pcf857x.h> | ||
17 | #include <linux/i2c/at24.h> | 19 | #include <linux/i2c/at24.h> |
18 | 20 | ||
19 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
@@ -38,6 +40,31 @@ static struct at24_platform_data da830_evm_i2c_eeprom_info = { | |||
38 | .context = (void *)0x7f00, | 40 | .context = (void *)0x7f00, |
39 | }; | 41 | }; |
40 | 42 | ||
43 | static int da830_evm_ui_expander_setup(struct i2c_client *client, int gpio, | ||
44 | unsigned ngpio, void *context) | ||
45 | { | ||
46 | gpio_request(gpio + 6, "MUX_MODE"); | ||
47 | #ifdef CONFIG_DA830_UI_LCD | ||
48 | gpio_direction_output(gpio + 6, 0); | ||
49 | #else /* Must be NAND or NOR */ | ||
50 | gpio_direction_output(gpio + 6, 1); | ||
51 | #endif | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | static int da830_evm_ui_expander_teardown(struct i2c_client *client, int gpio, | ||
56 | unsigned ngpio, void *context) | ||
57 | { | ||
58 | gpio_free(gpio + 6); | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | static struct pcf857x_platform_data da830_evm_ui_expander_info = { | ||
63 | .gpio_base = DAVINCI_N_GPIO, | ||
64 | .setup = da830_evm_ui_expander_setup, | ||
65 | .teardown = da830_evm_ui_expander_teardown, | ||
66 | }; | ||
67 | |||
41 | static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { | 68 | static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { |
42 | { | 69 | { |
43 | I2C_BOARD_INFO("24c256", 0x50), | 70 | I2C_BOARD_INFO("24c256", 0x50), |
@@ -45,7 +72,11 @@ static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { | |||
45 | }, | 72 | }, |
46 | { | 73 | { |
47 | I2C_BOARD_INFO("tlv320aic3x", 0x18), | 74 | I2C_BOARD_INFO("tlv320aic3x", 0x18), |
48 | } | 75 | }, |
76 | { | ||
77 | I2C_BOARD_INFO("pcf8574", 0x3f), | ||
78 | .platform_data = &da830_evm_ui_expander_info, | ||
79 | }, | ||
49 | }; | 80 | }; |
50 | 81 | ||
51 | static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = { | 82 | static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = { |
@@ -186,6 +217,17 @@ static __init void da830_evm_init(void) | |||
186 | da8xx_register_mcasp(1, &da830_evm_snd_data); | 217 | da8xx_register_mcasp(1, &da830_evm_snd_data); |
187 | 218 | ||
188 | da830_evm_init_mmc(); | 219 | da830_evm_init_mmc(); |
220 | |||
221 | #ifdef CONFIG_DA830_UI_LCD | ||
222 | ret = da8xx_pinmux_setup(da830_lcdcntl_pins); | ||
223 | if (ret) | ||
224 | pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n", | ||
225 | ret); | ||
226 | |||
227 | ret = da8xx_register_lcdc(&sharp_lcd035q3dg01_pdata); | ||
228 | if (ret) | ||
229 | pr_warning("da830_evm_init: lcd setup failed: %d\n", ret); | ||
230 | #endif | ||
189 | } | 231 | } |
190 | 232 | ||
191 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 233 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index f52174af06c2..f0b2f9690d9c 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -411,7 +411,7 @@ static struct davinci_clk da830_clks[] = { | |||
411 | CLK(NULL, "pwm2", &pwm2_clk), | 411 | CLK(NULL, "pwm2", &pwm2_clk), |
412 | CLK("eqep.0", NULL, &eqep0_clk), | 412 | CLK("eqep.0", NULL, &eqep0_clk), |
413 | CLK("eqep.1", NULL, &eqep1_clk), | 413 | CLK("eqep.1", NULL, &eqep1_clk), |
414 | CLK("da830_lcdc", NULL, &lcdc_clk), | 414 | CLK("da8xx_lcdc.0", NULL, &lcdc_clk), |
415 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), | 415 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), |
416 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), | 416 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), |
417 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), | 417 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), |