aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/p852/board-p852-sku1-c0x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/p852/board-p852-sku1-c0x.c')
-rw-r--r--arch/arm/mach-tegra/p852/board-p852-sku1-c0x.c98
1 files changed, 98 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/p852/board-p852-sku1-c0x.c b/arch/arm/mach-tegra/p852/board-p852-sku1-c0x.c
new file mode 100644
index 00000000000..4a783fb9b63
--- /dev/null
+++ b/arch/arm/mach-tegra/p852/board-p852-sku1-c0x.c
@@ -0,0 +1,98 @@
1/*
2 * arch/arm/mach-tegra/board-p852-sku1-c0x.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_sku1_c0x_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_MASTER | P852_SPI_ENABLE) << P852_SPI4_SHIFT);
25}
26
27static inline void p852_sku1_c0x_i2s_init(void)
28{
29 p852_sku_peripherals |= P852_SKU_I2S_ENABLE;
30 p852_i2s_peripherals |= ((P852_I2S_ENABLE | P852_I2S_TDM)
31 << P852_I2S1_SHIFT) | ((P852_I2S_ENABLE | P852_I2S_TDM)
32 << P852_I2S2_SHIFT);
33}
34
35static inline void p852_sku1_c0x_sdhci_init(void)
36{
37 p852_sku_peripherals |= P852_SKU_SDHCI_ENABLE;
38 p852_sdhci_peripherals |=
39 ((P852_SDHCI_ENABLE)
40 << P852_SDHCI4_SHIFT) |
41 ((P852_SDHCI_ENABLE | P852_SDHCI_CD_EN | P852_SDHCI_WP_EN)
42 << P852_SDHCI1_SHIFT) |
43 ((P852_SDHCI_ENABLE | P852_SDHCI_CD_EN | P852_SDHCI_WP_EN)
44 << P852_SDHCI3_SHIFT);
45
46 p852_sdhci_platform_data[0].cd_gpio = TEGRA_GPIO_PV0;
47 p852_sdhci_platform_data[0].wp_gpio = TEGRA_GPIO_PV1;
48 p852_sdhci_platform_data[2].cd_gpio = TEGRA_GPIO_PD7;
49 p852_sdhci_platform_data[2].wp_gpio = TEGRA_GPIO_PT4;
50}
51
52static inline void p852_sku1_c0x_uart_init(void)
53{
54 p852_sku_peripherals |= P852_SKU_UART_ENABLE;
55 p852_uart_peripherals |=
56 ((P852_UART_ENABLE | P852_UART_DB) << P852_UARTD_SHIFT) |
57 ((P852_UART_ENABLE | P852_UART_HS) << P852_UARTB_SHIFT) |
58 ((P852_UART_ENABLE | P852_UART_HS | P852_UART_ALT_PIN_CFG)
59 << P852_UARTA_SHIFT);
60}
61
62static inline void p852_sku1_c0x_display_init(void)
63{
64 p852_sku_peripherals |= P852_SKU_DISPLAY_ENABLE;
65 p852_display_peripherals |=
66 (P852_DISP_ENABLE << P852_DISPB_SHIFT);
67}
68
69static inline void p852_sku1_c0x_ulpi_init(void)
70{
71 p852_sku_peripherals |= P852_SKU_ULPI_DISABLE;
72}
73
74static inline void p852_sku1_c0x_i2c_init(void)
75{
76 p852_sku_peripherals |= P852_SKU_I2C_ENABLE;
77 p852_i2c_peripherals |=
78 ((P852_I2C_ENABLE) << P852_I2C1_SHIFT) |
79 ((P852_I2C_ENABLE) << P852_I2C2_SHIFT) |
80 ((P852_I2C_ENABLE) << P852_I2C3_SHIFT) |
81 ((P852_I2C_ENABLE) << P852_I2C4_SHIFT);
82}
83
84void __init p852_sku1_c0x_init(void)
85{
86 p852_sku_peripherals |= P852_SKU_NOR_ENABLE;
87
88 p852_sku1_c0x_spi_init();
89 p852_sku1_c0x_i2s_init();
90 p852_sku1_c0x_uart_init();
91 p852_sku1_c0x_sdhci_init();
92 p852_sku1_c0x_i2c_init();
93 p852_sku1_c0x_display_init();
94 p852_sku1_c0x_ulpi_init();
95
96 p852_common_init();
97}
98