diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2011-12-21 02:04:13 -0500 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-07-02 15:38:59 -0400 |
commit | 140fd977dc46bc750258f082cdf1cfea79dc1d14 (patch) | |
tree | 689eedb11b8b36a2bef6d08266074168a43f7281 /arch/arm | |
parent | 0134b932a02f272a3137e8331e38b69eff011587 (diff) |
pwm: tegra: Add device tree support
Add auxdata to instantiate the PWFM controller from a device tree,
include the corresponding nodes in the dtsi files for Tegra 20 and
Tegra 30 and add binding documentation.
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/tegra20.dtsi | 6 | ||||
-rw-r--r-- | arch/arm/boot/dts/tegra30.dtsi | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra20.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra30.c | 3 |
4 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index c417d67e9027..846af573f649 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
@@ -123,6 +123,12 @@ | |||
123 | status = "disable"; | 123 | status = "disable"; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | pwm { | ||
127 | compatible = "nvidia,tegra20-pwm"; | ||
128 | reg = <0x7000a000 0x100>; | ||
129 | #pwm-cells = <2>; | ||
130 | }; | ||
131 | |||
126 | i2c@7000c000 { | 132 | i2c@7000c000 { |
127 | compatible = "nvidia,tegra20-i2c"; | 133 | compatible = "nvidia,tegra20-i2c"; |
128 | reg = <0x7000c000 0x100>; | 134 | reg = <0x7000c000 0x100>; |
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index 2dcc09e784b5..f7f428e81e3a 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -117,6 +117,12 @@ | |||
117 | status = "disable"; | 117 | status = "disable"; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | pwm { | ||
121 | compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm"; | ||
122 | reg = <0x7000a000 0x100>; | ||
123 | #pwm-cells = <2>; | ||
124 | }; | ||
125 | |||
120 | i2c@7000c000 { | 126 | i2c@7000c000 { |
121 | compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; | 127 | compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; |
122 | reg = <0x7000c000 0x100>; | 128 | reg = <0x7000c000 0x100>; |
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index eb7249db50a5..962f1a1b12e9 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c | |||
@@ -64,6 +64,7 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { | |||
64 | &tegra_ehci2_pdata), | 64 | &tegra_ehci2_pdata), |
65 | OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2", | 65 | OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2", |
66 | &tegra_ehci3_pdata), | 66 | &tegra_ehci3_pdata), |
67 | OF_DEV_AUXDATA("nvidia,tegra20-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), | ||
67 | {} | 68 | {} |
68 | }; | 69 | }; |
69 | 70 | ||
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c index 4f76fa7a5da3..ffc6cae3eb2c 100644 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/arch/arm/mach-tegra/board-dt-tegra30.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
34 | #include <asm/hardware/gic.h> | 34 | #include <asm/hardware/gic.h> |
35 | 35 | ||
36 | #include <mach/iomap.h> | ||
37 | |||
36 | #include "board.h" | 38 | #include "board.h" |
37 | #include "clock.h" | 39 | #include "clock.h" |
38 | 40 | ||
@@ -52,6 +54,7 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { | |||
52 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C700, "tegra-i2c.3", NULL), | 54 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C700, "tegra-i2c.3", NULL), |
53 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000D000, "tegra-i2c.4", NULL), | 55 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000D000, "tegra-i2c.4", NULL), |
54 | OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL), | 56 | OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL), |
57 | OF_DEV_AUXDATA("nvidia,tegra30-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL), | ||
55 | {} | 58 | {} |
56 | }; | 59 | }; |
57 | 60 | ||