diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-06 16:34:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-06 16:34:43 -0400 |
commit | 44598f98b98e54beca34dc836b38eaea40be1abf (patch) | |
tree | 42a498e0267b23289ffe240907fd9bacb9156a2c /arch/sh/boards | |
parent | b4b50fd78b1e31989940dfc647e64453d0f7176a (diff) | |
parent | 4e5f67fa538ded704c904157e3ca23ceef9c7e64 (diff) |
Merge tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board updates from Olof Johansson:
"Board updates for 3.12. Again, a bit of domain overlap with SoC and
DT branches, but most of this is around legacy code and board support.
We've found that platform maintainers have a hard time separating all
of these out and might move towards fewer branches for next release.
- Removal of a number of Marvell Kirkwood board files, since contents
is now common and mostly configured via DT.
- Device-tree updates for Marvell Dove, including irqchip and
clocksource setup.
- Defconfig updates. Gotta go somewhere. One new one for Renesas
Lager.
- New backlight drivers for backlights used on Renesas shmobile
platforms.
- Removal of Renesas leds driver.
- Shuffling of some of the new Broadcom platforms to give room for
others in the same mach directory. More in 3.13"
* tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (67 commits)
mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event
mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion
ARM: bcm: Make secure API call optional
ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers)
ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona
ARM: bcm: Rename board_bcm
mmc: sdhci-bcm-kona: make linker-section warning go away
ARM: tegra: defconfig updates
ARM: dove: add initial DT file for Globalscale D2Plug
ARM: dove: add GPIO IR receiver node to SolidRun CuBox
ARM: dove: add common pinmux functions to DT
ARM: dove: add cpu device tree node
ARM: dove: update dove_defconfig with SI5351, PCI, and xHCI
arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument
ARM: kirkwood: fix DT building and update defconfig
ARM: kirkwood: Remove all remaining trace of DNS-320/325 platform code
ARM: configs: disable DEBUG_LL in bcm_defconfig
ARM: bcm281xx: Board specific reboot code
ARM bcm281xx: Turn on socket & network support.
ARM: bcm281xx: Turn on L2 cache.
...
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 37 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 48 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 19 |
3 files changed, 34 insertions, 70 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index a4f630f04ea3..65dd81baa7f6 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> |
@@ -302,7 +303,7 @@ static struct platform_device usbhs_device = { | |||
302 | .resource = usbhs_resources, | 303 | .resource = usbhs_resources, |
303 | }; | 304 | }; |
304 | 305 | ||
305 | /* LCDC */ | 306 | /* LCDC and backlight */ |
306 | static const struct fb_videomode ecovec_lcd_modes[] = { | 307 | static const struct fb_videomode ecovec_lcd_modes[] = { |
307 | { | 308 | { |
308 | .name = "Panel", | 309 | .name = "Panel", |
@@ -333,13 +334,6 @@ static const struct fb_videomode ecovec_dvi_modes[] = { | |||
333 | }, | 334 | }, |
334 | }; | 335 | }; |
335 | 336 | ||
336 | static int ecovec24_set_brightness(int brightness) | ||
337 | { | ||
338 | gpio_set_value(GPIO_PTR1, brightness); | ||
339 | |||
340 | return 0; | ||
341 | } | ||
342 | |||
343 | static struct sh_mobile_lcdc_info lcdc_info = { | 337 | static struct sh_mobile_lcdc_info lcdc_info = { |
344 | .ch[0] = { | 338 | .ch[0] = { |
345 | .interface_type = RGB18, | 339 | .interface_type = RGB18, |
@@ -349,11 +343,6 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
349 | .width = 152, | 343 | .width = 152, |
350 | .height = 91, | 344 | .height = 91, |
351 | }, | 345 | }, |
352 | .bl_info = { | ||
353 | .name = "sh_mobile_lcdc_bl", | ||
354 | .max_brightness = 1, | ||
355 | .set_brightness = ecovec24_set_brightness, | ||
356 | }, | ||
357 | } | 346 | } |
358 | }; | 347 | }; |
359 | 348 | ||
@@ -379,6 +368,20 @@ static struct platform_device lcdc_device = { | |||
379 | }, | 368 | }, |
380 | }; | 369 | }; |
381 | 370 | ||
371 | static 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 | |||
378 | static struct platform_device gpio_backlight_device = { | ||
379 | .name = "gpio-backlight", | ||
380 | .dev = { | ||
381 | .platform_data = &gpio_backlight_data, | ||
382 | }, | ||
383 | }; | ||
384 | |||
382 | /* CEU0 */ | 385 | /* CEU0 */ |
383 | static struct sh_mobile_ceu_info sh_mobile_ceu0_info = { | 386 | static struct sh_mobile_ceu_info sh_mobile_ceu0_info = { |
384 | .flags = SH_CEU_FLAG_USE_8BIT_BUS, | 387 | .flags = SH_CEU_FLAG_USE_8BIT_BUS, |
@@ -1048,6 +1051,7 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
1048 | &usb1_common_device, | 1051 | &usb1_common_device, |
1049 | &usbhs_device, | 1052 | &usbhs_device, |
1050 | &lcdc_device, | 1053 | &lcdc_device, |
1054 | &gpio_backlight_device, | ||
1051 | &ceu0_device, | 1055 | &ceu0_device, |
1052 | &ceu1_device, | 1056 | &ceu1_device, |
1053 | &keysc_device, | 1057 | &keysc_device, |
@@ -1238,11 +1242,9 @@ static int __init arch_setup(void) | |||
1238 | 1242 | ||
1239 | gpio_request(GPIO_PTE6, NULL); | 1243 | gpio_request(GPIO_PTE6, NULL); |
1240 | gpio_request(GPIO_PTU1, NULL); | 1244 | gpio_request(GPIO_PTU1, NULL); |
1241 | gpio_request(GPIO_PTR1, NULL); | ||
1242 | gpio_request(GPIO_PTA2, NULL); | 1245 | gpio_request(GPIO_PTA2, NULL); |
1243 | gpio_direction_input(GPIO_PTE6); | 1246 | gpio_direction_input(GPIO_PTE6); |
1244 | gpio_direction_output(GPIO_PTU1, 0); | 1247 | gpio_direction_output(GPIO_PTU1, 0); |
1245 | gpio_direction_output(GPIO_PTR1, 0); | ||
1246 | gpio_direction_output(GPIO_PTA2, 0); | 1248 | gpio_direction_output(GPIO_PTA2, 0); |
1247 | 1249 | ||
1248 | /* I/O buffer drive ability is high */ | 1250 | /* I/O buffer drive ability is high */ |
@@ -1255,6 +1257,9 @@ static int __init arch_setup(void) | |||
1255 | lcdc_info.ch[0].lcd_modes = ecovec_dvi_modes; | 1257 | lcdc_info.ch[0].lcd_modes = ecovec_dvi_modes; |
1256 | lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_dvi_modes); | 1258 | lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_dvi_modes); |
1257 | 1259 | ||
1260 | /* No backlight */ | ||
1261 | gpio_backlight_data.fbdev = NULL; | ||
1262 | |||
1258 | gpio_set_value(GPIO_PTA2, 1); | 1263 | gpio_set_value(GPIO_PTA2, 1); |
1259 | gpio_set_value(GPIO_PTU1, 1); | 1264 | gpio_set_value(GPIO_PTU1, 1); |
1260 | } else { | 1265 | } else { |
@@ -1264,8 +1269,6 @@ static int __init arch_setup(void) | |||
1264 | lcdc_info.ch[0].lcd_modes = ecovec_lcd_modes; | 1269 | lcdc_info.ch[0].lcd_modes = ecovec_lcd_modes; |
1265 | lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_lcd_modes); | 1270 | lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_lcd_modes); |
1266 | 1271 | ||
1267 | gpio_set_value(GPIO_PTR1, 1); | ||
1268 | |||
1269 | /* FIXME | 1272 | /* FIXME |
1270 | * | 1273 | * |
1271 | * LCDDON control is needed for Panel, | 1274 | * 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 | |||
286 | int 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 | ||
194 | static struct lv5207lp_platform_data kfr2r09_backlight_data = { | ||
195 | .fbdev = &kfr2r09_sh_lcdc_device.dev, | ||
196 | .def_value = 13, | ||
197 | .max_value = 13, | ||
198 | }; | ||
199 | |||
200 | static struct i2c_board_info kfr2r09_backlight_board_info = { | ||
201 | I2C_BOARD_INFO("lv5207lp", 0x75), | ||
202 | .platform_data = &kfr2r09_backlight_data, | ||
203 | }; | ||
204 | |||
198 | static struct r8a66597_platdata kfr2r09_usb0_gadget_data = { | 205 | static 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 | } |