| OLD | NEW |
| 1 /* | 1 /* |
| 2 * arch/arm/mach-tegra/board-seaboard.c | 2 * arch/arm/mach-tegra/board-seaboard.c |
| 3 * | 3 * |
| 4 * Copyright (c) 2010, NVIDIA Corporation. | 4 * Copyright (c) 2010, NVIDIA Corporation. |
| 5 * | 5 * |
| 6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
| 7 * it under the terms of the GNU General Public License as published by | 7 * it under the terms of the GNU General Public License as published by |
| 8 * the Free Software Foundation; either version 2 of the License, or | 8 * the Free Software Foundation; either version 2 of the License, or |
| 9 * (at your option) any later version. | 9 * (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include <linux/serial_8250.h> | 26 #include <linux/serial_8250.h> |
| 27 #include <linux/i2c.h> | 27 #include <linux/i2c.h> |
| 28 #include <linux/i2c-tegra.h> | 28 #include <linux/i2c-tegra.h> |
| 29 #include <linux/dma-mapping.h> | 29 #include <linux/dma-mapping.h> |
| 30 #include <linux/fsl_devices.h> | 30 #include <linux/fsl_devices.h> |
| 31 #include <linux/delay.h> | 31 #include <linux/delay.h> |
| 32 #include <linux/input.h> | 32 #include <linux/input.h> |
| 33 #include <linux/gpio_keys.h> | 33 #include <linux/gpio_keys.h> |
| 34 #include <linux/power/bq20z75.h> | 34 #include <linux/power/bq20z75.h> |
| 35 | 35 |
| 36 #include <sound/wm8903.h> |
| 37 |
| 38 #include <mach/seaboard_audio.h> |
| 36 #include <mach/iomap.h> | 39 #include <mach/iomap.h> |
| 37 #include <mach/irqs.h> | 40 #include <mach/irqs.h> |
| 38 #include <mach/pinmux.h> | 41 #include <mach/pinmux.h> |
| 39 #include <mach/iomap.h> | 42 #include <mach/iomap.h> |
| 40 #include <mach/io.h> | 43 #include <mach/io.h> |
| 41 #include <mach/gpio.h> | 44 #include <mach/gpio.h> |
| 42 #include <mach/clk.h> | 45 #include <mach/clk.h> |
| 43 #include <mach/usb_phy.h> | 46 #include <mach/usb_phy.h> |
| 44 #include <mach/kbc.h> | 47 #include <mach/kbc.h> |
| 45 #include <mach/suspend.h> | 48 #include <mach/suspend.h> |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 }; | 270 }; |
| 268 | 271 |
| 269 | 272 |
| 270 static void seaboard_isl29018_init(void) | 273 static void seaboard_isl29018_init(void) |
| 271 { | 274 { |
| 272 tegra_gpio_enable(TEGRA_GPIO_ISL29018_IRQ); | 275 tegra_gpio_enable(TEGRA_GPIO_ISL29018_IRQ); |
| 273 gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); | 276 gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); |
| 274 gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ); | 277 gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ); |
| 275 } | 278 } |
| 276 | 279 |
| 280 static struct wm8903_platform_data wm8903_pdata = { |
| 281 .irq_active_low = 0, |
| 282 .micdet_cfg = 0, |
| 283 .micdet_delay = 100, |
| 284 .gpio_base = GPIO_WM8903(0), |
| 285 .gpio_cfg = { |
| 286 WM8903_GPIO_NO_CONFIG, |
| 287 WM8903_GPIO_NO_CONFIG, |
| 288 0, |
| 289 WM8903_GPIO_NO_CONFIG, |
| 290 WM8903_GPIO_NO_CONFIG, |
| 291 }, |
| 292 }; |
| 293 |
| 277 static struct i2c_board_info __initdata wm8903_device = { | 294 static struct i2c_board_info __initdata wm8903_device = { |
| 278 I2C_BOARD_INFO("wm8903", 0x1a), | 295 I2C_BOARD_INFO("wm8903", 0x1a), |
| 296 .platform_data = &wm8903_pdata, |
| 297 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PX3), |
| 279 }; | 298 }; |
| 280 | 299 |
| 281 static struct i2c_board_info __initdata isl29018_device = { | 300 static struct i2c_board_info __initdata isl29018_device = { |
| 282 I2C_BOARD_INFO("isl29018", 0x44), | 301 I2C_BOARD_INFO("isl29018", 0x44), |
| 283 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ), | 302 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ), |
| 284 }; | 303 }; |
| 285 | 304 |
| 286 static struct i2c_board_info __initdata adt7461_device = { | 305 static struct i2c_board_info __initdata adt7461_device = { |
| 287 I2C_BOARD_INFO("adt7461", 0x4c), | 306 I2C_BOARD_INFO("adt7461", 0x4c), |
| 288 }; | 307 }; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 }; | 489 }; |
| 471 | 490 |
| 472 static struct platform_device seaboard_battery_device = { | 491 static struct platform_device seaboard_battery_device = { |
| 473 .name = "bq20z75-battery", | 492 .name = "bq20z75-battery", |
| 474 .id = 0, | 493 .id = 0, |
| 475 . dev = { | 494 . dev = { |
| 476 .platform_data = &seaboard_battery_platform_data, | 495 .platform_data = &seaboard_battery_platform_data, |
| 477 }, | 496 }, |
| 478 }; | 497 }; |
| 479 | 498 |
| 499 static struct seaboard_audio_platform_data audio_pdata = { |
| 500 .gpio_spkr_en = GPIO_WM8903(2), |
| 501 .gpio_hp_det = TEGRA_GPIO_PX1, |
| 502 }; |
| 503 |
| 504 static struct platform_device audio_device = { |
| 505 .name = "tegra-snd-seaboard", |
| 506 .id = 0, |
| 507 .dev = { |
| 508 .platform_data = &audio_pdata, |
| 509 }, |
| 510 }; |
| 511 |
| 480 static struct platform_device *seaboard_devices[] __initdata = { | 512 static struct platform_device *seaboard_devices[] __initdata = { |
| 481 &debug_uart, | 513 &debug_uart, |
| 482 &tegra_rtc_device, | 514 &tegra_rtc_device, |
| 483 &pmu_device, | 515 &pmu_device, |
| 484 &seaboard_gpio_keys_device, | 516 &seaboard_gpio_keys_device, |
| 485 &tegra_gart_device, | 517 &tegra_gart_device, |
| 486 &tegra_i2s_device1, | 518 &tegra_i2s_device1, |
| 487 &tegra_das_device, | 519 &tegra_das_device, |
| 488 &tegra_pcm_device, | 520 &tegra_pcm_device, |
| 521 &audio_device, |
| 489 &tegra_avp_device, | 522 &tegra_avp_device, |
| 490 }; | 523 }; |
| 491 | 524 |
| 492 static void __init seaboard_wlan_init(void) | 525 static void __init seaboard_wlan_init(void) |
| 493 { | 526 { |
| 494 /* set wifi power/reset gpio */ | 527 /* set wifi power/reset gpio */ |
| 495 tegra_gpio_enable(TEGRA_GPIO_PK6); | 528 tegra_gpio_enable(TEGRA_GPIO_PK6); |
| 496 gpio_request(TEGRA_GPIO_PK6, "wlan_pwr_rst"); | 529 gpio_request(TEGRA_GPIO_PK6, "wlan_pwr_rst"); |
| 497 gpio_direction_output(TEGRA_GPIO_PK6, 1); | 530 gpio_direction_output(TEGRA_GPIO_PK6, 1); |
| 498 } | 531 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 571 |
| 539 static void __init __tegra_seaboard_init(void) | 572 static void __init __tegra_seaboard_init(void) |
| 540 { | 573 { |
| 541 seaboard_pinmux_init(); | 574 seaboard_pinmux_init(); |
| 542 | 575 |
| 543 tegra_common_init(); | 576 tegra_common_init(); |
| 544 tegra_init_suspend(&seaboard_suspend); | 577 tegra_init_suspend(&seaboard_suspend); |
| 545 | 578 |
| 546 tegra_clk_init_from_table(seaboard_clk_init_table); | 579 tegra_clk_init_from_table(seaboard_clk_init_table); |
| 547 | 580 |
| 581 tegra_gpio_enable(audio_pdata.gpio_hp_det); |
| 582 tegra_gpio_enable(TEGRA_IRQ_TO_GPIO(wm8903_device.irq)); |
| 583 |
| 548 platform_add_devices(seaboard_devices, ARRAY_SIZE(seaboard_devices)); | 584 platform_add_devices(seaboard_devices, ARRAY_SIZE(seaboard_devices)); |
| 549 | 585 |
| 550 seaboard_ehci_init(); | 586 seaboard_ehci_init(); |
| 551 seaboard_panel_init(); | 587 seaboard_panel_init(); |
| 552 seaboard_sdhci_init(); | 588 seaboard_sdhci_init(); |
| 553 seaboard_power_init(); | 589 seaboard_power_init(); |
| 554 seaboard_kbc_init(); | 590 seaboard_kbc_init(); |
| 555 | 591 |
| 556 seaboard_wlan_init(); | 592 seaboard_wlan_init(); |
| 557 seaboard_emc_init(); | 593 seaboard_emc_init(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 .timer = &tegra_timer, | 673 .timer = &tegra_timer, |
| 638 MACHINE_END | 674 MACHINE_END |
| 639 | 675 |
| 640 MACHINE_START(WARIO, "wario") | 676 MACHINE_START(WARIO, "wario") |
| 641 .boot_params = 0x00000100, | 677 .boot_params = 0x00000100, |
| 642 .init_irq = tegra_init_irq, | 678 .init_irq = tegra_init_irq, |
| 643 .init_machine = tegra_wario_init, | 679 .init_machine = tegra_wario_init, |
| 644 .map_io = tegra_map_common_io, | 680 .map_io = tegra_map_common_io, |
| 645 .timer = &tegra_timer, | 681 .timer = &tegra_timer, |
| 646 MACHINE_END | 682 MACHINE_END |
| OLD | NEW |