summaryrefslogtreecommitdiff
path: root/include/linux/tegra_devices.h
blob: 4f1d4c8fb2671a681eae8f0865036e1e03a9c4dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*
 * include/linux/tegra_devices.h
 *
 * Definitions for platform devices and related flags NVIDIA Tegra SoCs
 *
 * Copyright (C) 2009 NVIDIA Corporation
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef _LINUX_DEVICE_TEGRA_H
#define _LINUX_DEVICE_TEGRA_H

#ifndef NV_DEBUG
#if defined(CONFIG_MACH_TEGRA_GENERIC_DEBUG)
#define NV_DEBUG 1
#else
#define NV_DEBUG 0
#endif
#endif

#include "nvcommon.h"
#include "nvrm_gpio.h"
#include "nvddk_usbphy.h"
#include "nvodm_query.h"
#include "nvodm_query_pinmux.h"

/* Platform data for EHCI HCD driver */
struct tegra_hcd_platform_data {
	NvU32			instance;
	NvRmGpioPinHandle	hGpioIDpin;
	const NvOdmUsbProperty	*pUsbProperty;
	NvU32			powerClientId;
	NvU32			vBusPowerRail;
	/* USB PHY power rail. Tegra has integrated UTMI (USB transciver
	 * macrocell interface) PHY on USB controllers 0 and 2. These 2 PHYs
	 * have its own rails.
	 */
	NvU32			phyPowerRail;
	NvDdkUsbPhyHandle	hUsbPhy;
};

/* Platform data for USB OTG driver */
struct tegra_otg_platform_data {
	NvU32			instance;
	const NvOdmUsbProperty	*usb_property;
};

/* Platfrom data for I2C bus driver */
struct tegra_i2c_platform_data {
	NvU32		IoModuleID;
	NvU32		Instance;
	NvU32		ClockInKHz;
	NvOdmI2cPinMap	PinMuxConfig;
};

/* Platfrom data for W1 bus driver */
struct tegra_w1_platform_data {
	NvU32		Instance;
	NvOdmOwrPinMap	PinMuxConfig;
};


/* Platfrom data for SPI bus driver */
struct tegra_spi_platform_data {
	NvU32 IoModuleID;
	NvU32 Instance;
	NvU32 PinMuxConfig;
};

struct tegra_sdio_platform_data {
	NvU32 StartOffset; /* start sector offset to MBR for the card */
};

#ifdef CONFIG_DEVNVMAP
int nvmap_add_carveout_heap(unsigned long base, size_t size,
	const char *name, unsigned int bitmask);
#endif

#endif