summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-01-11 21:43:30 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-01-11 21:43:30 +0100
commit183a4e7addfc5ee2203173a7132f7268f3258a35 (patch)
treeaba1132f6af11ac895561a8e5100ee38132f897e /arch/arm/mach-tegra
parentdac862f29b50e72b3e8125bdd6a7785ea1accb17 (diff)
colibri_t30: w1: add platform data
Add one-wire platform data. Still requires explicitly enabling the following two kernel configuration options: CONFIG_W1 CONFIG_W1_MASTER_TEGRA
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-colibri_t30.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index 75ffa81a2260..d25daa04afb6 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -34,6 +34,7 @@
#include <mach/tegra_fiq_debugger.h>
#include <mach/thermal.h>
#include <mach/usb_phy.h>
+#include <mach/w1.h>
#include "board-colibri_t30.h"
#include "board.h"
@@ -1075,6 +1076,31 @@ static void colibri_t30_usb_init(void)
platform_device_register(&tegra_ehci3_device);
}
+/* W1, aka OWR, aka OneWire */
+
+#ifdef CONFIG_W1_MASTER_TEGRA
+struct tegra_w1_timings colibri_t30_w1_timings = {
+ .tsu = 1,
+ .trelease = 0xf,
+ .trdv = 0xf,
+ .tlow0 = 0x3c,
+ .tlow1 = 1,
+ .tslot = 0x77,
+
+ .tpdl = 0x78,
+ .tpdh = 0x1e,
+ .trstl = 0x1df,
+ .trsth = 0x1df,
+ .rdsclk = 0x7,
+ .psclk = 0x50,
+};
+
+struct tegra_w1_platform_data colibri_t30_w1_platform_data = {
+ .clk_id = "tegra_w1",
+ .timings = &colibri_t30_w1_timings,
+};
+#endif /* CONFIG_W1_MASTER_TEGRA */
+
static struct platform_device *colibri_t30_devices[] __initdata = {
&tegra_pmu_device,
#if defined(CONFIG_RTC_DRV_TEGRA)
@@ -1120,6 +1146,9 @@ static struct platform_device *colibri_t30_devices[] __initdata = {
&tegra_pwfm1_device,
&tegra_pwfm2_device,
&tegra_pwfm3_device,
+#ifdef CONFIG_W1_MASTER_TEGRA
+ &tegra_w1_device,
+#endif
};
static void __init colibri_t30_init(void)