aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/board-espt.c1
-rw-r--r--arch/sh/boards/board-sh7757lcr.c4
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c38
-rw-r--r--arch/sh/boards/mach-kfr2r09/lcd_wqvga.c48
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c19
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c3
-rw-r--r--arch/sh/boards/mach-sh7763rdp/setup.c1
7 files changed, 36 insertions, 78 deletions
diff --git a/arch/sh/boards/board-espt.c b/arch/sh/boards/board-espt.c
index 4d94dff9015c..7291e2f11a47 100644
--- a/arch/sh/boards/board-espt.c
+++ b/arch/sh/boards/board-espt.c
@@ -80,7 +80,6 @@ static struct resource sh_eth_resources[] = {
80static struct sh_eth_plat_data sh7763_eth_pdata = { 80static struct sh_eth_plat_data sh7763_eth_pdata = {
81 .phy = 0, 81 .phy = 0,
82 .edmac_endian = EDMAC_LITTLE_ENDIAN, 82 .edmac_endian = EDMAC_LITTLE_ENDIAN,
83 .register_type = SH_ETH_REG_GIGABIT,
84 .phy_interface = PHY_INTERFACE_MODE_MII, 83 .phy_interface = PHY_INTERFACE_MODE_MII,
85}; 84};
86 85
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
index 4f114d1cd019..25c5a932f9fe 100644
--- a/arch/sh/boards/board-sh7757lcr.c
+++ b/arch/sh/boards/board-sh7757lcr.c
@@ -77,7 +77,6 @@ static struct resource sh_eth0_resources[] = {
77static struct sh_eth_plat_data sh7757_eth0_pdata = { 77static struct sh_eth_plat_data sh7757_eth0_pdata = {
78 .phy = 1, 78 .phy = 1,
79 .edmac_endian = EDMAC_LITTLE_ENDIAN, 79 .edmac_endian = EDMAC_LITTLE_ENDIAN,
80 .register_type = SH_ETH_REG_FAST_SH4,
81 .set_mdio_gate = sh7757_eth_set_mdio_gate, 80 .set_mdio_gate = sh7757_eth_set_mdio_gate,
82}; 81};
83 82
@@ -106,7 +105,6 @@ static struct resource sh_eth1_resources[] = {
106static struct sh_eth_plat_data sh7757_eth1_pdata = { 105static struct sh_eth_plat_data sh7757_eth1_pdata = {
107 .phy = 1, 106 .phy = 1,
108 .edmac_endian = EDMAC_LITTLE_ENDIAN, 107 .edmac_endian = EDMAC_LITTLE_ENDIAN,
109 .register_type = SH_ETH_REG_FAST_SH4,
110 .set_mdio_gate = sh7757_eth_set_mdio_gate, 108 .set_mdio_gate = sh7757_eth_set_mdio_gate,
111}; 109};
112 110
@@ -151,7 +149,6 @@ static struct resource sh_eth_giga0_resources[] = {
151static struct sh_eth_plat_data sh7757_eth_giga0_pdata = { 149static struct sh_eth_plat_data sh7757_eth_giga0_pdata = {
152 .phy = 18, 150 .phy = 18,
153 .edmac_endian = EDMAC_LITTLE_ENDIAN, 151 .edmac_endian = EDMAC_LITTLE_ENDIAN,
154 .register_type = SH_ETH_REG_GIGABIT,
155 .set_mdio_gate = sh7757_eth_giga_set_mdio_gate, 152 .set_mdio_gate = sh7757_eth_giga_set_mdio_gate,
156 .phy_interface = PHY_INTERFACE_MODE_RGMII_ID, 153 .phy_interface = PHY_INTERFACE_MODE_RGMII_ID,
157}; 154};
@@ -186,7 +183,6 @@ static struct resource sh_eth_giga1_resources[] = {
186static struct sh_eth_plat_data sh7757_eth_giga1_pdata = { 183static struct sh_eth_plat_data sh7757_eth_giga1_pdata = {
187 .phy = 19, 184 .phy = 19,
188 .edmac_endian = EDMAC_LITTLE_ENDIAN, 185 .edmac_endian = EDMAC_LITTLE_ENDIAN,
189 .register_type = SH_ETH_REG_GIGABIT,
190 .set_mdio_gate = sh7757_eth_giga_set_mdio_gate, 186 .set_mdio_gate = sh7757_eth_giga_set_mdio_gate,
191 .phy_interface = PHY_INTERFACE_MODE_RGMII_ID, 187 .phy_interface = PHY_INTERFACE_MODE_RGMII_ID,
192}; 188};
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 0332d2557303..1fa8be409771 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -30,6 +30,7 @@
30#include <linux/spi/mmc_spi.h> 30#include <linux/spi/mmc_spi.h>
31#include <linux/input.h> 31#include <linux/input.h>
32#include <linux/input/sh_keysc.h> 32#include <linux/input/sh_keysc.h>
33#include <linux/platform_data/gpio_backlight.h>
33#include <linux/sh_eth.h> 34#include <linux/sh_eth.h>
34#include <linux/sh_intc.h> 35#include <linux/sh_intc.h>
35#include <linux/videodev2.h> 36#include <linux/videodev2.h>
@@ -159,7 +160,6 @@ static struct resource sh_eth_resources[] = {
159static struct sh_eth_plat_data sh_eth_plat = { 160static struct sh_eth_plat_data sh_eth_plat = {
160 .phy = 0x1f, /* SMSC LAN8700 */ 161 .phy = 0x1f, /* SMSC LAN8700 */
161 .edmac_endian = EDMAC_LITTLE_ENDIAN, 162 .edmac_endian = EDMAC_LITTLE_ENDIAN,
162 .register_type = SH_ETH_REG_FAST_SH4,
163 .phy_interface = PHY_INTERFACE_MODE_MII, 163 .phy_interface = PHY_INTERFACE_MODE_MII,
164 .ether_link_active_low = 1 164 .ether_link_active_low = 1
165}; 165};
@@ -303,7 +303,7 @@ static struct platform_device usbhs_device = {
303 .resource = usbhs_resources, 303 .resource = usbhs_resources,
304}; 304};
305 305
306/* LCDC */ 306/* LCDC and backlight */
307static const struct fb_videomode ecovec_lcd_modes[] = { 307static const struct fb_videomode ecovec_lcd_modes[] = {
308 { 308 {
309 .name = "Panel", 309 .name = "Panel",
@@ -334,13 +334,6 @@ static const struct fb_videomode ecovec_dvi_modes[] = {
334 }, 334 },
335}; 335};
336 336
337static int ecovec24_set_brightness(int brightness)
338{
339 gpio_set_value(GPIO_PTR1, brightness);
340
341 return 0;
342}
343
344static struct sh_mobile_lcdc_info lcdc_info = { 337static struct sh_mobile_lcdc_info lcdc_info = {
345 .ch[0] = { 338 .ch[0] = {
346 .interface_type = RGB18, 339 .interface_type = RGB18,
@@ -350,11 +343,6 @@ static struct sh_mobile_lcdc_info lcdc_info = {
350 .width = 152, 343 .width = 152,
351 .height = 91, 344 .height = 91,
352 }, 345 },
353 .bl_info = {
354 .name = "sh_mobile_lcdc_bl",
355 .max_brightness = 1,
356 .set_brightness = ecovec24_set_brightness,
357 },
358 } 346 }
359}; 347};
360 348
@@ -380,6 +368,20 @@ static struct platform_device lcdc_device = {
380 }, 368 },
381}; 369};
382 370
371static struct gpio_backlight_platform_data gpio_backlight_data = {
372 .fbdev = &lcdc_device.dev,
373 .gpio = GPIO_PTR1,
374 .def_value = 1,
375 .name = "backlight",
376};
377
378static struct platform_device gpio_backlight_device = {
379 .name = "gpio-backlight",
380 .dev = {
381 .platform_data = &gpio_backlight_data,
382 },
383};
384
383/* CEU0 */ 385/* CEU0 */
384static struct sh_mobile_ceu_info sh_mobile_ceu0_info = { 386static struct sh_mobile_ceu_info sh_mobile_ceu0_info = {
385 .flags = SH_CEU_FLAG_USE_8BIT_BUS, 387 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
@@ -986,6 +988,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
986 &usb1_common_device, 988 &usb1_common_device,
987 &usbhs_device, 989 &usbhs_device,
988 &lcdc_device, 990 &lcdc_device,
991 &gpio_backlight_device,
989 &ceu0_device, 992 &ceu0_device,
990 &ceu1_device, 993 &ceu1_device,
991 &keysc_device, 994 &keysc_device,
@@ -1176,11 +1179,9 @@ static int __init arch_setup(void)
1176 1179
1177 gpio_request(GPIO_PTE6, NULL); 1180 gpio_request(GPIO_PTE6, NULL);
1178 gpio_request(GPIO_PTU1, NULL); 1181 gpio_request(GPIO_PTU1, NULL);
1179 gpio_request(GPIO_PTR1, NULL);
1180 gpio_request(GPIO_PTA2, NULL); 1182 gpio_request(GPIO_PTA2, NULL);
1181 gpio_direction_input(GPIO_PTE6); 1183 gpio_direction_input(GPIO_PTE6);
1182 gpio_direction_output(GPIO_PTU1, 0); 1184 gpio_direction_output(GPIO_PTU1, 0);
1183 gpio_direction_output(GPIO_PTR1, 0);
1184 gpio_direction_output(GPIO_PTA2, 0); 1185 gpio_direction_output(GPIO_PTA2, 0);
1185 1186
1186 /* I/O buffer drive ability is high */ 1187 /* I/O buffer drive ability is high */
@@ -1193,6 +1194,9 @@ static int __init arch_setup(void)
1193 lcdc_info.ch[0].lcd_modes = ecovec_dvi_modes; 1194 lcdc_info.ch[0].lcd_modes = ecovec_dvi_modes;
1194 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_dvi_modes); 1195 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_dvi_modes);
1195 1196
1197 /* No backlight */
1198 gpio_backlight_data.fbdev = NULL;
1199
1196 gpio_set_value(GPIO_PTA2, 1); 1200 gpio_set_value(GPIO_PTA2, 1);
1197 gpio_set_value(GPIO_PTU1, 1); 1201 gpio_set_value(GPIO_PTU1, 1);
1198 } else { 1202 } else {
@@ -1202,8 +1206,6 @@ static int __init arch_setup(void)
1202 lcdc_info.ch[0].lcd_modes = ecovec_lcd_modes; 1206 lcdc_info.ch[0].lcd_modes = ecovec_lcd_modes;
1203 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_lcd_modes); 1207 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_lcd_modes);
1204 1208
1205 gpio_set_value(GPIO_PTR1, 1);
1206
1207 /* FIXME 1209 /* FIXME
1208 * 1210 *
1209 * LCDDON control is needed for Panel, 1211 * LCDDON control is needed for Panel,
diff --git a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
index c62050332629..355a78a3b313 100644
--- a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
+++ b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
@@ -276,51 +276,3 @@ void kfr2r09_lcd_start(void *sohandle, struct sh_mobile_lcdc_sys_bus_ops *so)
276{ 276{
277 write_memory_start(sohandle, so); 277 write_memory_start(sohandle, so);
278} 278}
279
280#define CTRL_CKSW 0x10
281#define CTRL_C10 0x20
282#define CTRL_CPSW 0x80
283#define MAIN_MLED4 0x40
284#define MAIN_MSW 0x80
285
286int kfr2r09_lcd_set_brightness(int brightness)
287{
288 struct i2c_adapter *a;
289 struct i2c_msg msg;
290 unsigned char buf[2];
291 int ret;
292
293 a = i2c_get_adapter(0);
294 if (!a)
295 return -ENODEV;
296
297 buf[0] = 0x00;
298 if (brightness)
299 buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW;
300 else
301 buf[1] = 0;
302
303 msg.addr = 0x75;
304 msg.buf = buf;
305 msg.len = 2;
306 msg.flags = 0;
307 ret = i2c_transfer(a, &msg, 1);
308 if (ret != 1)
309 return -ENODEV;
310
311 buf[0] = 0x01;
312 if (brightness)
313 buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c;
314 else
315 buf[1] = 0;
316
317 msg.addr = 0x75;
318 msg.buf = buf;
319 msg.len = 2;
320 msg.flags = 0;
321 ret = i2c_transfer(a, &msg, 1);
322 if (ret != 1)
323 return -ENODEV;
324
325 return 0;
326}
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index ab502f12ef57..1df4398f8375 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -21,6 +21,7 @@
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/input/sh_keysc.h> 22#include <linux/input/sh_keysc.h>
23#include <linux/i2c.h> 23#include <linux/i2c.h>
24#include <linux/platform_data/lv5207lp.h>
24#include <linux/regulator/fixed.h> 25#include <linux/regulator/fixed.h>
25#include <linux/regulator/machine.h> 26#include <linux/regulator/machine.h>
26#include <linux/usb/r8a66597.h> 27#include <linux/usb/r8a66597.h>
@@ -159,11 +160,6 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = {
159 .setup_sys = kfr2r09_lcd_setup, 160 .setup_sys = kfr2r09_lcd_setup,
160 .start_transfer = kfr2r09_lcd_start, 161 .start_transfer = kfr2r09_lcd_start,
161 }, 162 },
162 .bl_info = {
163 .name = "sh_mobile_lcdc_bl",
164 .max_brightness = 1,
165 .set_brightness = kfr2r09_lcd_set_brightness,
166 },
167 .sys_bus_cfg = { 163 .sys_bus_cfg = {
168 .ldmt2r = 0x07010904, 164 .ldmt2r = 0x07010904,
169 .ldmt3r = 0x14012914, 165 .ldmt3r = 0x14012914,
@@ -195,6 +191,17 @@ static struct platform_device kfr2r09_sh_lcdc_device = {
195 }, 191 },
196}; 192};
197 193
194static struct lv5207lp_platform_data kfr2r09_backlight_data = {
195 .fbdev = &kfr2r09_sh_lcdc_device.dev,
196 .def_value = 13,
197 .max_value = 13,
198};
199
200static struct i2c_board_info kfr2r09_backlight_board_info = {
201 I2C_BOARD_INFO("lv5207lp", 0x75),
202 .platform_data = &kfr2r09_backlight_data,
203};
204
198static struct r8a66597_platdata kfr2r09_usb0_gadget_data = { 205static struct r8a66597_platdata kfr2r09_usb0_gadget_data = {
199 .on_chip = 1, 206 .on_chip = 1,
200}; 207};
@@ -627,6 +634,8 @@ static int __init kfr2r09_devices_setup(void)
627 gpio_request(GPIO_FN_SDHI0CMD, NULL); 634 gpio_request(GPIO_FN_SDHI0CMD, NULL);
628 gpio_request(GPIO_FN_SDHI0CLK, NULL); 635 gpio_request(GPIO_FN_SDHI0CLK, NULL);
629 636
637 i2c_register_board_info(0, &kfr2r09_backlight_board_info, 1);
638
630 return platform_add_devices(kfr2r09_devices, 639 return platform_add_devices(kfr2r09_devices,
631 ARRAY_SIZE(kfr2r09_devices)); 640 ARRAY_SIZE(kfr2r09_devices));
632} 641}
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index b70180ef3e29..21e4230659a5 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -365,7 +365,7 @@ static struct platform_device keysc_device = {
365static struct resource sh_eth_resources[] = { 365static struct resource sh_eth_resources[] = {
366 [0] = { 366 [0] = {
367 .start = SH_ETH_ADDR, 367 .start = SH_ETH_ADDR,
368 .end = SH_ETH_ADDR + 0x1FC, 368 .end = SH_ETH_ADDR + 0x1FC - 1,
369 .flags = IORESOURCE_MEM, 369 .flags = IORESOURCE_MEM,
370 }, 370 },
371 [1] = { 371 [1] = {
@@ -377,6 +377,7 @@ static struct resource sh_eth_resources[] = {
377static struct sh_eth_plat_data sh_eth_plat = { 377static struct sh_eth_plat_data sh_eth_plat = {
378 .phy = 0x1f, /* SMSC LAN8187 */ 378 .phy = 0x1f, /* SMSC LAN8187 */
379 .edmac_endian = EDMAC_LITTLE_ENDIAN, 379 .edmac_endian = EDMAC_LITTLE_ENDIAN,
380 .phy_interface = PHY_INTERFACE_MODE_MII,
380}; 381};
381 382
382static struct platform_device sh_eth_device = { 383static struct platform_device sh_eth_device = {
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c
index 50ba481fa240..2c8fb04685d4 100644
--- a/arch/sh/boards/mach-sh7763rdp/setup.c
+++ b/arch/sh/boards/mach-sh7763rdp/setup.c
@@ -88,7 +88,6 @@ static struct resource sh_eth_resources[] = {
88static struct sh_eth_plat_data sh7763_eth_pdata = { 88static struct sh_eth_plat_data sh7763_eth_pdata = {
89 .phy = 1, 89 .phy = 1,
90 .edmac_endian = EDMAC_LITTLE_ENDIAN, 90 .edmac_endian = EDMAC_LITTLE_ENDIAN,
91 .register_type = SH_ETH_REG_GIGABIT,
92 .phy_interface = PHY_INTERFACE_MODE_MII, 91 .phy_interface = PHY_INTERFACE_MODE_MII,
93}; 92};
94 93