]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - arch/arm/mach-pxa/saarb.c
ARM: restart: pxa: use new restart hook
[mirror_ubuntu-zesty-kernel.git] / arch / arm / mach-pxa / saarb.c
CommitLineData
c9b5ef47
HZ
1/*
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 */
2f8163ba 12#include <linux/gpio.h>
c9b5ef47
HZ
13#include <linux/init.h>
14#include <linux/kernel.h>
15#include <linux/i2c.h>
b459396e 16#include <linux/i2c/pxa-i2c.h>
c9b5ef47 17#include <linux/mfd/88pm860x.h>
f55be1bf 18#include <linux/gpio.h>
c9b5ef47
HZ
19
20#include <asm/mach-types.h>
21#include <asm/mach/arch.h>
22
23#include <mach/irqs.h>
24#include <mach/hardware.h>
25#include <mach/mfp.h>
26#include <mach/mfp-pxa930.h>
654a60e0 27#include <mach/pxa95x.h>
c9b5ef47 28
c9b5ef47
HZ
29#include "generic.h"
30
31#define SAARB_NR_IRQS (IRQ_BOARD_START + 40)
32
33static struct pm860x_touch_pdata saarb_touch = {
34 .gpadc_prebias = 1,
35 .slot_cycle = 1,
36 .tsi_prebias = 6,
37 .pen_prebias = 16,
38 .pen_prechg = 2,
39 .res_x = 300,
40};
41
42static struct pm860x_backlight_pdata saarb_backlight[] = {
43 {
44 .id = PM8606_ID_BACKLIGHT,
45 .iset = PM8606_WLED_CURRENT(24),
46 .flags = PM8606_BACKLIGHT1,
47 },
48 {},
49};
50
51static struct pm860x_led_pdata saarb_led[] = {
52 {
53 .id = PM8606_ID_LED,
54 .iset = PM8606_LED_CURRENT(12),
55 .flags = PM8606_LED1_RED,
56 }, {
57 .id = PM8606_ID_LED,
58 .iset = PM8606_LED_CURRENT(12),
59 .flags = PM8606_LED1_GREEN,
60 }, {
61 .id = PM8606_ID_LED,
62 .iset = PM8606_LED_CURRENT(12),
63 .flags = PM8606_LED1_BLUE,
64 }, {
65 .id = PM8606_ID_LED,
66 .iset = PM8606_LED_CURRENT(12),
67 .flags = PM8606_LED2_RED,
68 }, {
69 .id = PM8606_ID_LED,
70 .iset = PM8606_LED_CURRENT(12),
71 .flags = PM8606_LED2_GREEN,
72 }, {
73 .id = PM8606_ID_LED,
74 .iset = PM8606_LED_CURRENT(12),
75 .flags = PM8606_LED2_BLUE,
76 },
77};
78
79static struct pm860x_platform_data saarb_pm8607_info = {
80 .touch = &saarb_touch,
81 .backlight = &saarb_backlight[0],
82 .led = &saarb_led[0],
83 .companion_addr = 0x10,
84 .irq_mode = 0,
85 .irq_base = IRQ_BOARD_START,
86
87 .i2c_port = GI2C_PORT,
88};
89
90static struct i2c_board_info saarb_i2c_info[] = {
91 {
92 .type = "88PM860x",
93 .addr = 0x34,
94 .platform_data = &saarb_pm8607_info,
95 .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)),
96 },
97};
98
99static void __init saarb_init(void)
100{
101 pxa_set_ffuart_info(NULL);
102 pxa_set_i2c_info(NULL);
103 i2c_register_board_info(0, ARRAY_AND_SIZE(saarb_i2c_info));
104}
105
106MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
7375aba6 107 .atag_offset = 0x100,
150f164e 108 .map_io = pxa3xx_map_io,
c9b5ef47
HZ
109 .nr_irqs = SAARB_NR_IRQS,
110 .init_irq = pxa95x_init_irq,
8a97ae2f 111 .handle_irq = pxa3xx_handle_irq,
c9b5ef47
HZ
112 .timer = &pxa_timer,
113 .init_machine = saarb_init,
271a74fc 114 .restart = pxa_restart,
c9b5ef47
HZ
115MACHINE_END
116