blob: 87e9b757ef34d180b97477de5dcd31b7d4a8b7b5 [file] [log] [blame]
Haojian Zhuangc9b5ef42010-11-24 11:54:20 +08001/*
2 * linux/arch/arm/mach-pxa/saarb.c
3 *
4 * Support for the Marvell Handheld Platform (aka SAARB)
5 *
6 * Copyright (C) 2007-2010 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * publishhed by the Free Software Foundation.
11 */
Russell King2f8163b2011-07-26 10:53:52 +010012#include <linux/gpio.h>
Haojian Zhuangc9b5ef42010-11-24 11:54:20 +080013#include <linux/init.h>
14#include <linux/kernel.h>
15#include <linux/i2c.h>
Sebastian Andrzej Siewiorb4593962011-02-23 12:38:16 +010016#include <linux/i2c/pxa-i2c.h>
Haojian Zhuangc9b5ef42010-11-24 11:54:20 +080017#include <linux/mfd/88pm860x.h>
18
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21
22#include <mach/irqs.h>
23#include <mach/hardware.h>
24#include <mach/mfp.h>
25#include <mach/mfp-pxa930.h>
Haojian Zhuangc9b5ef42010-11-24 11:54:20 +080026
Haojian Zhuangc9b5ef42010-11-24 11:54:20 +080027#include "generic.h"
28
29#define SAARB_NR_IRQS (IRQ_BOARD_START + 40)
30
31static struct pm860x_touch_pdata saarb_touch = {
32 .gpadc_prebias = 1,
33 .slot_cycle = 1,
34 .tsi_prebias = 6,
35 .pen_prebias = 16,
36 .pen_prechg = 2,
37 .res_x = 300,
38};
39
40static struct pm860x_backlight_pdata saarb_backlight[] = {
41 {
42 .id = PM8606_ID_BACKLIGHT,
43 .iset = PM8606_WLED_CURRENT(24),
44 .flags = PM8606_BACKLIGHT1,
45 },
46 {},
47};
48
49static struct pm860x_led_pdata saarb_led[] = {
50 {
51 .id = PM8606_ID_LED,
52 .iset = PM8606_LED_CURRENT(12),
53 .flags = PM8606_LED1_RED,
54 }, {
55 .id = PM8606_ID_LED,
56 .iset = PM8606_LED_CURRENT(12),
57 .flags = PM8606_LED1_GREEN,
58 }, {
59 .id = PM8606_ID_LED,
60 .iset = PM8606_LED_CURRENT(12),
61 .flags = PM8606_LED1_BLUE,
62 }, {
63 .id = PM8606_ID_LED,
64 .iset = PM8606_LED_CURRENT(12),
65 .flags = PM8606_LED2_RED,
66 }, {
67 .id = PM8606_ID_LED,
68 .iset = PM8606_LED_CURRENT(12),
69 .flags = PM8606_LED2_GREEN,
70 }, {
71 .id = PM8606_ID_LED,
72 .iset = PM8606_LED_CURRENT(12),
73 .flags = PM8606_LED2_BLUE,
74 },
75};
76
77static struct pm860x_platform_data saarb_pm8607_info = {
78 .touch = &saarb_touch,
79 .backlight = &saarb_backlight[0],
80 .led = &saarb_led[0],
81 .companion_addr = 0x10,
82 .irq_mode = 0,
83 .irq_base = IRQ_BOARD_START,
84
85 .i2c_port = GI2C_PORT,
86};
87
88static struct i2c_board_info saarb_i2c_info[] = {
89 {
90 .type = "88PM860x",
91 .addr = 0x34,
92 .platform_data = &saarb_pm8607_info,
93 .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)),
94 },
95};
96
97static void __init saarb_init(void)
98{
99 pxa_set_ffuart_info(NULL);
100 pxa_set_i2c_info(NULL);
101 i2c_register_board_info(0, ARRAY_AND_SIZE(saarb_i2c_info));
102}
103
104MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
105 .boot_params = 0xa0000100,
Eric Miao150f1642011-05-18 15:48:32 +0800106 .map_io = pxa3xx_map_io,
Haojian Zhuangc9b5ef42010-11-24 11:54:20 +0800107 .nr_irqs = SAARB_NR_IRQS,
108 .init_irq = pxa95x_init_irq,
Eric Miao8a97ae22011-05-18 21:30:04 +0800109 .handle_irq = pxa3xx_handle_irq,
Haojian Zhuangc9b5ef42010-11-24 11:54:20 +0800110 .timer = &pxa_timer,
111 .init_machine = saarb_init,
112MACHINE_END
113