aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/Kconfig2
-rw-r--r--arch/arm/mach-pxa/zylonite.c26
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c4
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c2
4 files changed, 21 insertions, 13 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 9c01505b1825..b7a3281c420e 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -116,6 +116,7 @@ config MACH_COLIBRI
116config MACH_ZYLONITE 116config MACH_ZYLONITE
117 bool "PXA3xx Development Platform" 117 bool "PXA3xx Development Platform"
118 select PXA3xx 118 select PXA3xx
119 select HAVE_PWM
119 120
120config MACH_LITTLETON 121config MACH_LITTLETON
121 bool "PXA3xx Form Factor Platform (aka Littleton)" 122 bool "PXA3xx Form Factor Platform (aka Littleton)"
@@ -276,6 +277,7 @@ config PXA_SSP
276 277
277config PXA_PWM 278config PXA_PWM
278 tristate 279 tristate
280 default BACKLIGHT_PWM
279 help 281 help
280 Enable support for PXA2xx/PXA3xx PWM controllers 282 Enable support for PXA2xx/PXA3xx PWM controllers
281endif 283endif
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 4a0028087ea6..b13bb9385138 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -18,6 +18,7 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/pwm_backlight.h>
21 22
22#include <asm/mach-types.h> 23#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -28,12 +29,12 @@
28#include <asm/arch/mmc.h> 29#include <asm/arch/mmc.h>
29#include <asm/arch/pxa27x_keypad.h> 30#include <asm/arch/pxa27x_keypad.h>
30 31
32#include "devices.h"
31#include "generic.h" 33#include "generic.h"
32 34
33#define MAX_SLOTS 3 35#define MAX_SLOTS 3
34struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; 36struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
35 37
36int gpio_backlight;
37int gpio_eth_irq; 38int gpio_eth_irq;
38 39
39int wm9713_irq; 40int wm9713_irq;
@@ -62,10 +63,20 @@ static struct platform_device smc91x_device = {
62}; 63};
63 64
64#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) 65#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
65static void zylonite_backlight_power(int on) 66static struct platform_pwm_backlight_data zylonite_backlight_data = {
66{ 67 .pwm_id = 3,
67 gpio_set_value(gpio_backlight, on); 68 .max_brightness = 100,
68} 69 .dft_brightness = 100,
70 .pwm_period_ns = 10000,
71};
72
73static struct platform_device zylonite_backlight_device = {
74 .name = "pwm-backlight",
75 .dev = {
76 .parent = &pxa27x_device_pwm1.dev,
77 .platform_data = &zylonite_backlight_data,
78 },
79};
69 80
70static struct pxafb_mode_info toshiba_ltm035a776c_mode = { 81static struct pxafb_mode_info toshiba_ltm035a776c_mode = {
71 .pixclock = 110000, 82 .pixclock = 110000,
@@ -98,7 +109,6 @@ static struct pxafb_mode_info toshiba_ltm04c380k_mode = {
98static struct pxafb_mach_info zylonite_toshiba_lcd_info = { 109static struct pxafb_mach_info zylonite_toshiba_lcd_info = {
99 .num_modes = 1, 110 .num_modes = 1,
100 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, 111 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
101 .pxafb_backlight_power = zylonite_backlight_power,
102}; 112};
103 113
104static struct pxafb_mode_info sharp_ls037_modes[] = { 114static struct pxafb_mode_info sharp_ls037_modes[] = {
@@ -134,13 +144,11 @@ static struct pxafb_mach_info zylonite_sharp_lcd_info = {
134 .modes = sharp_ls037_modes, 144 .modes = sharp_ls037_modes,
135 .num_modes = 2, 145 .num_modes = 2,
136 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, 146 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
137 .pxafb_backlight_power = zylonite_backlight_power,
138}; 147};
139 148
140static void __init zylonite_init_lcd(void) 149static void __init zylonite_init_lcd(void)
141{ 150{
142 /* backlight GPIO: output, default on */ 151 platform_device_register(&zylonite_backlight_device);
143 gpio_direction_output(gpio_backlight, 1);
144 152
145 if (lcd_id & 0x20) { 153 if (lcd_id & 0x20) {
146 set_pxa_fb_info(&zylonite_sharp_lcd_info); 154 set_pxa_fb_info(&zylonite_sharp_lcd_info);
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index 324fb9daae28..6f7ae972b8db 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -50,6 +50,7 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
50 GPIO75_LCD_BIAS, 50 GPIO75_LCD_BIAS,
51 GPIO76_LCD_VSYNC, 51 GPIO76_LCD_VSYNC,
52 GPIO127_LCD_CS_N, 52 GPIO127_LCD_CS_N,
53 GPIO20_PWM3_OUT, /* backlight */
53 54
54 /* BTUART */ 55 /* BTUART */
55 GPIO111_UART2_RTS, 56 GPIO111_UART2_RTS,
@@ -200,9 +201,6 @@ void __init zylonite_pxa300_init(void)
200 /* detect LCD panel */ 201 /* detect LCD panel */
201 zylonite_detect_lcd_panel(); 202 zylonite_detect_lcd_panel();
202 203
203 /* GPIO pin assignment */
204 gpio_backlight = mfp_to_gpio(MFP_PIN_GPIO20);
205
206 /* MMC card detect & write protect for controller 0 */ 204 /* MMC card detect & write protect for controller 0 */
207 zylonite_mmc_slot[0].gpio_cd = EXT_GPIO(0); 205 zylonite_mmc_slot[0].gpio_cd = EXT_GPIO(0);
208 zylonite_mmc_slot[0].gpio_wp = EXT_GPIO(2); 206 zylonite_mmc_slot[0].gpio_wp = EXT_GPIO(2);
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index 193d07903b06..2b4fc34919ac 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -49,6 +49,7 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
49 GPIO15_2_LCD_LCLK, 49 GPIO15_2_LCD_LCLK,
50 GPIO16_2_LCD_PCLK, 50 GPIO16_2_LCD_PCLK,
51 GPIO17_2_LCD_BIAS, 51 GPIO17_2_LCD_BIAS,
52 GPIO14_PWM3_OUT, /* backlight */
52 53
53 /* FFUART */ 54 /* FFUART */
54 GPIO41_UART1_RXD | MFP_LPM_EDGE_FALL, 55 GPIO41_UART1_RXD | MFP_LPM_EDGE_FALL,
@@ -187,7 +188,6 @@ void __init zylonite_pxa320_init(void)
187 zylonite_detect_lcd_panel(); 188 zylonite_detect_lcd_panel();
188 189
189 /* GPIO pin assignment */ 190 /* GPIO pin assignment */
190 gpio_backlight = mfp_to_gpio(MFP_PIN_GPIO14);
191 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9); 191 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9);
192 192
193 /* MMC card detect & write protect for controller 0 */ 193 /* MMC card detect & write protect for controller 0 */