|
@@ -540,3 +540,154 @@ static struct gpio_keys_button aquila_gpio_keys_table[] = {
|
|
|
.desc = "gpio-keys: KEY_POWER",
|
|
|
.type = EV_KEY,
|
|
|
.active_low = 1,
|
|
|
+ .wakeup = 1,
|
|
|
+ .debounce_interval = 1,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_keys_platform_data aquila_gpio_keys_data = {
|
|
|
+ .buttons = aquila_gpio_keys_table,
|
|
|
+ .nbuttons = ARRAY_SIZE(aquila_gpio_keys_table),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device aquila_device_gpiokeys = {
|
|
|
+ .name = "gpio-keys",
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &aquila_gpio_keys_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static void __init aquila_pmic_init(void)
|
|
|
+{
|
|
|
+ /* AP_PMIC_IRQ: EINT7 */
|
|
|
+ s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_SFN(0xf));
|
|
|
+ s3c_gpio_setpull(S5PV210_GPH0(7), S3C_GPIO_PULL_UP);
|
|
|
+
|
|
|
+ /* nPower: EINT22 */
|
|
|
+ s3c_gpio_cfgpin(S5PV210_GPH2(6), S3C_GPIO_SFN(0xf));
|
|
|
+ s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP);
|
|
|
+}
|
|
|
+
|
|
|
+/* MoviNAND */
|
|
|
+static struct s3c_sdhci_platdata aquila_hsmmc0_data __initdata = {
|
|
|
+ .max_width = 4,
|
|
|
+ .cd_type = S3C_SDHCI_CD_PERMANENT,
|
|
|
+};
|
|
|
+
|
|
|
+/* Wireless LAN */
|
|
|
+static struct s3c_sdhci_platdata aquila_hsmmc1_data __initdata = {
|
|
|
+ .max_width = 4,
|
|
|
+ .cd_type = S3C_SDHCI_CD_EXTERNAL,
|
|
|
+ /* ext_cd_{init,cleanup} callbacks will be added later */
|
|
|
+};
|
|
|
+
|
|
|
+/* External Flash */
|
|
|
+#define AQUILA_EXT_FLASH_EN S5PV210_MP05(4)
|
|
|
+#define AQUILA_EXT_FLASH_CD S5PV210_GPH3(4)
|
|
|
+static struct s3c_sdhci_platdata aquila_hsmmc2_data __initdata = {
|
|
|
+ .max_width = 4,
|
|
|
+ .cd_type = S3C_SDHCI_CD_GPIO,
|
|
|
+ .ext_cd_gpio = AQUILA_EXT_FLASH_CD,
|
|
|
+ .ext_cd_gpio_invert = 1,
|
|
|
+};
|
|
|
+
|
|
|
+static void aquila_setup_sdhci(void)
|
|
|
+{
|
|
|
+ gpio_request_one(AQUILA_EXT_FLASH_EN, GPIOF_OUT_INIT_HIGH, "FLASH_EN");
|
|
|
+
|
|
|
+ s3c_sdhci0_set_platdata(&aquila_hsmmc0_data);
|
|
|
+ s3c_sdhci1_set_platdata(&aquila_hsmmc1_data);
|
|
|
+ s3c_sdhci2_set_platdata(&aquila_hsmmc2_data);
|
|
|
+};
|
|
|
+
|
|
|
+/* Audio device */
|
|
|
+static struct platform_device aquila_device_audio = {
|
|
|
+ .name = "smdk-audio",
|
|
|
+ .id = -1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device *aquila_devices[] __initdata = {
|
|
|
+ &aquila_i2c_gpio_pmic,
|
|
|
+ &aquila_i2c_gpio5,
|
|
|
+ &aquila_device_gpiokeys,
|
|
|
+ &aquila_device_audio,
|
|
|
+ &s3c_device_fb,
|
|
|
+ &s5p_device_onenand,
|
|
|
+ &s3c_device_hsmmc0,
|
|
|
+ &s3c_device_hsmmc1,
|
|
|
+ &s3c_device_hsmmc2,
|
|
|
+ &s5p_device_fimc0,
|
|
|
+ &s5p_device_fimc1,
|
|
|
+ &s5p_device_fimc2,
|
|
|
+ &s5p_device_fimc_md,
|
|
|
+ &s5pv210_device_iis0,
|
|
|
+ &wm8994_fixed_voltage0,
|
|
|
+ &wm8994_fixed_voltage1,
|
|
|
+};
|
|
|
+
|
|
|
+static void __init aquila_sound_init(void)
|
|
|
+{
|
|
|
+ unsigned int gpio;
|
|
|
+
|
|
|
+ /* CODEC_XTAL_EN
|
|
|
+ *
|
|
|
+ * The Aquila board have a oscillator which provide main clock
|
|
|
+ * to WM8994 codec. The oscillator provide 24MHz clock to WM8994
|
|
|
+ * clock. Set gpio setting of "CODEC_XTAL_EN" to enable a oscillator.
|
|
|
+ * */
|
|
|
+ gpio = S5PV210_GPH3(2); /* XEINT_26 */
|
|
|
+ gpio_request(gpio, "CODEC_XTAL_EN");
|
|
|
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_OUTPUT);
|
|
|
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
|
|
|
+
|
|
|
+ /* Ths main clock of WM8994 codec uses the output of CLKOUT pin.
|
|
|
+ * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS)
|
|
|
+ * because it needs 24MHz clock to operate WM8994 codec.
|
|
|
+ */
|
|
|
+ __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
|
|
|
+}
|
|
|
+
|
|
|
+static void __init aquila_map_io(void)
|
|
|
+{
|
|
|
+ s5pv210_init_io(NULL, 0);
|
|
|
+ s3c24xx_init_clocks(24000000);
|
|
|
+ s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs));
|
|
|
+ s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
|
|
|
+}
|
|
|
+
|
|
|
+static void __init aquila_machine_init(void)
|
|
|
+{
|
|
|
+ /* PMIC */
|
|
|
+ aquila_pmic_init();
|
|
|
+ i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs,
|
|
|
+ ARRAY_SIZE(i2c_gpio_pmic_devs));
|
|
|
+ /* SDHCI */
|
|
|
+ aquila_setup_sdhci();
|
|
|
+
|
|
|
+ s3c_fimc_setname(0, "s5p-fimc");
|
|
|
+ s3c_fimc_setname(1, "s5p-fimc");
|
|
|
+ s3c_fimc_setname(2, "s5p-fimc");
|
|
|
+
|
|
|
+ /* SOUND */
|
|
|
+ aquila_sound_init();
|
|
|
+ i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs,
|
|
|
+ ARRAY_SIZE(i2c_gpio5_devs));
|
|
|
+
|
|
|
+ /* FB */
|
|
|
+ s3c_fb_set_platdata(&aquila_lcd_pdata);
|
|
|
+
|
|
|
+ platform_add_devices(aquila_devices, ARRAY_SIZE(aquila_devices));
|
|
|
+}
|
|
|
+
|
|
|
+MACHINE_START(AQUILA, "Aquila")
|
|
|
+ /* Maintainers:
|
|
|
+ Marek Szyprowski <m.szyprowski@samsung.com>
|
|
|
+ Kyungmin Park <kyungmin.park@samsung.com> */
|
|
|
+ .atag_offset = 0x100,
|
|
|
+ .init_irq = s5pv210_init_irq,
|
|
|
+ .handle_irq = vic_handle_irq,
|
|
|
+ .map_io = aquila_map_io,
|
|
|
+ .init_machine = aquila_machine_init,
|
|
|
+ .timer = &s5p_timer,
|
|
|
+ .restart = s5pv210_restart,
|
|
|
+MACHINE_END
|