1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-mmp/teton_bga.c
5 * Support for the Marvell PXA168 Teton BGA Development Platform.
7 * Author: Mark F. Brown <mark.brown314@gmail.com>
9 * This code is based on aspenite.c
12 #include <linux/init.h>
13 #include <linux/kernel.h>
14 #include <linux/platform_device.h>
15 #include <linux/gpio.h>
16 #include <linux/gpio-pxa.h>
17 #include <linux/input.h>
18 #include <linux/platform_data/keypad-pxa27x.h>
19 #include <linux/i2c.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
24 #include "mfp-pxa168.h"
26 #include "teton_bga.h"
31 static unsigned long teton_bga_pin_config
[] __initdata
= {
50 static struct pxa_gpio_platform_data pxa168_gpio_pdata
= {
51 .irq_base
= MMP_GPIO_TO_IRQ(0),
54 static unsigned int teton_bga_matrix_key_map
[] = {
61 static struct matrix_keymap_data teton_bga_matrix_keymap_data
= {
62 .keymap
= teton_bga_matrix_key_map
,
63 .keymap_size
= ARRAY_SIZE(teton_bga_matrix_key_map
),
66 static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata
= {
69 .matrix_keymap_data
= &teton_bga_matrix_keymap_data
,
70 .debounce_interval
= 30,
73 static struct i2c_board_info teton_bga_i2c_info
[] __initdata
= {
75 I2C_BOARD_INFO("ds1337", 0x68),
76 .irq
= MMP_GPIO_TO_IRQ(RTC_INT_GPIO
)
80 static void __init
teton_bga_init(void)
82 mfp_config(ARRAY_AND_SIZE(teton_bga_pin_config
));
86 pxa168_add_keypad(&teton_bga_keypad_info
);
87 pxa168_add_twsi(0, NULL
, ARRAY_AND_SIZE(teton_bga_i2c_info
));
88 platform_device_add_data(&pxa168_device_gpio
, &pxa168_gpio_pdata
,
89 sizeof(struct pxa_gpio_platform_data
));
90 platform_device_register(&pxa168_device_gpio
);
93 MACHINE_START(TETON_BGA
, "PXA168-based Teton BGA Development Platform")
95 .nr_irqs
= MMP_NR_IRQS
,
96 .init_irq
= pxa168_init_irq
,
97 .init_time
= pxa168_timer_init
,
98 .init_machine
= teton_bga_init
,
99 .restart
= pxa168_restart
,