aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/p852/board-p852-sku13-b00.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/p852/board-p852-sku13-b00.c')
-rw-r--r--arch/arm/mach-tegra/p852/board-p852-sku13-b00.c114
1 files changed, 114 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/p852/board-p852-sku13-b00.c b/arch/arm/mach-tegra/p852/board-p852-sku13-b00.c
new file mode 100644
index 00000000000..39e01f660ea
--- /dev/null
+++ b/arch/arm/mach-tegra/p852/board-p852-sku13-b00.c
@@ -0,0 +1,114 @@
1/*
2 * arch/arm/mach-tegra/board-p852-sku13-b00.c
3 *
4 * Copyright (c) 2010-2011, NVIDIA Corporation.
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include "board-p852.h"
18
19static inline void p852_sku13_b00_spi_init(void)
20{
21 p852_sku_peripherals |= P852_SKU_SPI_ENABLE;
22 p852_spi_peripherals |=
23 ((P852_SPI_MASTER | P852_SPI_ENABLE) << P852_SPI1_SHIFT) |
24 ((P852_SPI_SLAVE | P852_SPI_ENABLE) << P852_SPI2_SHIFT) |
25 ((P852_SPI_SLAVE | P852_SPI_ENABLE) << P852_SPI3_SHIFT) |
26 ((P852_SPI_MASTER | P852_SPI_ENABLE) << P852_SPI4_SHIFT);
27}
28
29static inline void p852_sku13_b00_i2s_init(void)
30{
31 p852_sku_peripherals |= P852_SKU_I2S_ENABLE;
32 p852_i2s_peripherals |= (P852_I2S_ENABLE << P852_I2S1_SHIFT) |
33 (P852_I2S_ENABLE << P852_I2S2_SHIFT);
34}
35
36static inline void p852_sku13_b00_sdhci_init(void)
37{
38 p852_sku_peripherals |= P852_SKU_SDHCI_ENABLE;
39 p852_sdhci_peripherals |=
40 (P852_SDHCI_ENABLE << P852_SDHCI1_SHIFT) |
41 (P852_SDHCI_ENABLE << P852_SDHCI2_SHIFT);
42
43 p852_sdhci_platform_data[1].is_8bit = true;
44}
45
46static inline void p852_sku13_b00_uart_init(void)
47{
48 p852_sku_peripherals |= P852_SKU_UART_ENABLE;
49 p852_uart_peripherals |=
50 ((P852_UART_ENABLE | P852_UART_DB) << P852_UARTA_SHIFT) |
51 ((P852_UART_ENABLE | P852_UART_HS) << P852_UARTB_SHIFT) |
52 ((P852_UART_ENABLE) << P852_UARTC_SHIFT);
53}
54
55static inline void p852_sku13_b00_display_init(void)
56{
57 p852_sku_peripherals |= P852_SKU_DISPLAY_ENABLE;
58 p852_display_peripherals |=
59 (P852_DISP_ENABLE << P852_DISPA_SHIFT);
60}
61
62static inline void p852_sku13_b00_i2c_init(void)
63{
64 p852_sku_peripherals |= P852_SKU_I2C_ENABLE;
65 p852_i2c_peripherals |=
66 ((P852_I2C_ENABLE) << P852_I2C1_SHIFT) |
67 ((P852_I2C_ENABLE) << P852_I2C2_SHIFT) |
68 ((P852_I2C_ENABLE) << P852_I2C3_SHIFT) |
69 ((P852_I2C_ENABLE) << P852_I2C4_SHIFT);
70 p852_i2c_set_default_clock(0, 40000);
71}
72
73#ifdef CONFIG_TEGRA_SPI_I2S
74static struct tegra_spi_i2s_platform_data spi_i2s_data = {
75 .gpio_i2s = {
76 .gpio_no = TEGRA_GPIO_PT5,
77 .active_state = 1,
78 },
79 .gpio_spi = {
80 .gpio_no = TEGRA_GPIO_PV7,
81 .active_state = 1,
82 },
83 .spi_i2s_timeout_ms = 25,
84};
85
86static inline void p852_sku13_b00_spi_i2s_init(void)
87{
88 tegra_spi_i2s_device.platform_data = &spi_i2s_data;
89 /* cpld_gpio_dir1 */
90 tegra_pinmux_set_tristate(TEGRA_PINGROUP_PTA, TEGRA_TRI_NORMAL);
91 /* cpld_gpio_dir2 */
92 tegra_pinmux_set_tristate(TEGRA_PINGROUP_LVP0, TEGRA_TRI_NORMAL);
93 p852_spi_i2s_init();
94}
95#endif
96
97void __init p852_sku13_b00_init(void)
98{
99 p852_sku_peripherals |= P852_SKU_NAND_ENABLE;
100
101
102 p852_sku13_b00_spi_init();
103 p852_sku13_b00_i2s_init();
104 p852_sku13_b00_uart_init();
105 p852_sku13_b00_sdhci_init();
106 p852_sku13_b00_i2c_init();
107 p852_sku13_b00_display_init();
108
109 p852_common_init();
110
111#ifdef CONFIG_TEGRA_SPI_I2S
112 p852_sku13_b00_spi_i2s_init();
113#endif
114}